package com.rc.saas.tenant.mapper.tenant;

import java.util.List;

import com.rc.saas.tenant.common.base.BaseMapper;
import com.rc.saas.tenant.model.tenant.TenantMenu;
import com.rc.saas.tenant.model.tenant.TenantMenuExample;
import com.rc.saas.tenant.model.tenant.TenantRoleMenu;
import org.apache.ibatis.annotations.Param;

public interface TenantMenuMapper extends BaseMapper<Long, TenantMenu, TenantMenuExample> {
    void deleteTreeByMenu(Long menuId);

    List<TenantMenu> listMenuByRole(Long roleId);

    //List<TenantMenu> selectMenuByUser(Long userId);

    List<TenantMenu> listMenuByTopMenuId(@Param(value = "tenantCode") String tenantCode, @Param(value = "topMenuId") Long topMenuId,@Param("tenantRoleMenuList") List<TenantRoleMenu> tenantRoleMenuList);
//    List<TenantMenu> listMenuByTopMenuId(@Param(value = "tenantCode") String tenantCode, @Param(value = "topMenuId") Long topMenuId);

    /**
     * 查找分销商角色所拥有的菜单,所有分销已在平台的管理后台设置好,是固定的
     * @return
     */
    List<TenantMenu> listMenuByOperator();


    /**
     * 按企业会员查询菜单
     * @return
     */
    List<TenantMenu> listMenuByEnterprise();

    List<TenantMenu> listOperatorMenuByTopMenuId(Long topMenuId);

    List<TenantMenu> listOperatoMenuByTopMenuIdAndOperator(@Param(value = "tenantOperatorCode") String tenantOperatorCode, @Param(value = "topMenuId") Long topMenuId);

    List<TenantMenu> listEnterpriseMenuByTopMenuId(Long topMenuId);

    //List<TenantMenu> selectOperatorMenuByTopMenuId2(@Param(value = "tenantCode") String tenantCode, @Param(value = "topMenuId") Long topMenuId);

    /**
     * 查找分销商查询TOP菜单
     * @return
     */
    List<TenantMenu> listTopMenuByOperator();

    /**
     * 按企业会员查询TOP菜单
     * @return
     */
    List<TenantMenu> listTopMenuByEnterprise();

    List<TenantMenu> listTopMenuByTenantRoleMenu(@Param("tenantRoleMenuList") List<TenantRoleMenu> tenantRoleMenuList);
}